<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .red{
            width: 400px;
            height: 400px;
            background-color: red;
        }
        .blue{
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .green{
            width: 100px;
            height: 100px;
            background-color: green;
        }
    </style>
</head>
<body>
    <div class="red">
        <div class="blue">
            <div class="green"></div>
        </div>
    </div>
    <button id="btn01">点击</button>
    <script>
        /**
         * 
         * 1.事件对象event
         * type
         * target
         * currentTarget
         * bubbles
         * pagex
         * pagey
         **/
        document.querySelector("#btn01").addEventListener("click", function(event){
            console.log(event);
        }, false);
        document.querySelector(".red").addEventListener("click", function(event){
            alert("Red")
        }, true)
        document.querySelector(".blue").addEventListener("click", function(event){
            alert("Blue")
        },true)
        document.querySelector(".green").addEventListener("click", function(event){
            alert("Green")
        },true)
    </script>
</body>
</html>